<table style="width: 40%; border: 1px solid silver;">
  <tr>
    <td style="padding: 10px"><form method="post" action="/backend_dev.php/matrix/new">
      First group:
    </td>
  </tr>
  <tr>
    <td>
      <select name="group_1" style="margin-left: 40px; min-width: 200px;">
        <?php foreach($groups as $group): ?>
          <option value="<?php echo $group['id'] ?>"><?php echo $group['title'] ?></option>
        <?php endforeach; ?>
      </select>
    </td>
  </tr>
  <tr>
    <td style="padding: 10px">
      Second group:
    </td>
  </tr>
  <tr>
    <td>
      <select name="group_2" style="margin-left: 40px; min-width: 200px;">
        <?php foreach($groups as $group): ?>
          <option value="<?php echo $group['id'] ?>"><?php echo $group['title'] ?></option>
        <?php endforeach; ?>
      </select>
    </td>
  </tr>
  <tr>
    <td style="padding: 10px 0 10px 10px">
      <input type="submit" value="Continue ..." /></form>
    </td>
  </tr>
</table>